from flask import Flask, render_template, redirect, url_for, request, flash
from flask_sqlalchemy import SQLAlchemy
import click
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField, SubmitField, TextAreaField
from wtforms.validators import DataRequired, Length
from .models import *
from .extensions import db, login_manager
import os
from .forms import *
from flask_login import login_user


app = Flask(__name__)
basedir = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv('DATABASE_URL', 'sqlite:///' + os.path.join(basedir, 'data.db'))
app.secret_key = "secret_key"
db.init_app(app)
login_manager.init_app(app)


from notes_ms import views
